import datetime

from models.dbmodel import DbModel

class DbParkRecord(DbModel):
    def __init__(self):
        self.id : int = 0
        self.park_name: str = ''
        self.user_id: int = 0
        self.car_number: str = ''
        self.task_id: int = 0
        self.platform_id: int = 0
        self.entry_time: datetime.datetime = None
        self.parking_often: str = ''
        self.parking_fees: str = ''
        self.erased: int = 0
        self.gmt_create: datetime.datetime = None
        self.gmt_modified: datetime.datetime = None
        
class UiParkRecord(DbParkRecord):
    def __init__(self, dbtask: DbParkRecord):
        for key in dbtask.__dict__.keys():
            setattr(self, key, getattr(dbtask, key))
        self.create_time: str = None
        self.update_time: str = None
        self.task_name: str = None
        self.user_name: str = None
        self.entry_time_str: str = None